#ifndef __CCU6_COMPARE_H__
#define __CCU6_COMPARE_H__

#include "tle_device.h"

#define  MIN_DUTY 									  1200U
#define  SET_5_DUTY 								  1140U
#define  SET_10_DUTY 								  1080U
#define  SET_20_DUTY 								  960U
#define  SET_30_DUTY 								  840U
#define  SET_40_DUTY 								  720U
#define  SET_50_DUTY 								  600U


#define  MOTOR_PHASE_50HZ     			  			 1000LU
#define	 MOTOR_OPEN_PHASE            				 1666LU
#define  MOTOR_OPEN_PHASE_DIFF        				 20LU


#define  MOTOR_MAX__VOLTAGE     					 		 1080U
#define	 MOTOR_OPEN_VOLTAGE          			     1080U
#define  MOTOR_OPEN_VOLTAGE_DIFF      				 500U

typedef enum
{
	MOTOR_PRE_POSITION,
	MOTOR_OPEN_ACC
} motor_status_e;

typedef enum
{
	MOTOR_CCW,
	MOTOR_CW
} motor_driction_e;

typedef enum
{
	PHASE_CHANGE,
	PHASE_WAIT
} change_phase_e;

typedef struct
{
	motor_status_e motor_status;
	motor_driction_e	driction;
	change_phase_e change_phase;
	uint8 step;
	uint16 phase;
	uint16 voltage;
	uint16 phase_time;
}motor_param_t;




#endif 

